import request from '@/utils/request';

// 索引名,状态码,响应时长下拉框列表查询
export function getIndexAndStatusApi(query) {
  return request({
    url: `/v1/analyze/es/get_es_index_status_time_list`,
    method: 'get',
    params: query
  });
}

// 状态码异常百分比列表查询
export function getErrStatusListApI(query) {
  return request({
    url: `/v1/analyze/es/get_es_status_error_list`,
    method: 'get',
    params: query
  });
}

// 响应时长异常百分比列表查询
export function getRequestTimeListApi(query) {
  return request({
    url: `/v1/analyze/es/get_es_request_time_list`,
    method: 'get',
    params: query
  });
}

// 崩溃数添加接口
export function addCollapseApi(query) {
  return request({
    url: `/v1/analyze/collapse/add_or_update_collapse`,
    method: 'post',
    data: query
  });
}

// 活跃崩溃率列表查询
export function getActiveCollapseListApi(query) {
  return request({
    url: `/v1/analyze/collapse/get_active_collapse_list`,
    method: 'get',
    params: query
  });
}
